package Socket;
public class Sender {
	
	public static void sendToArduino(String dataStr){
		try{ 
			SocketSingleton.getInstance().getWriterA().print(dataStr); 
			SocketSingleton.getInstance().getWriterA().flush();
		}
		catch(Exception e){System.out.println("failed to print to arduino socket. "+e.getMessage());}
	}
	
	public static void sendToN7(String dataStr){
		try{ 
			SocketSingleton.getInstance().getWriterN().print(dataStr); 
			SocketSingleton.getInstance().getWriterN().flush();
		}
		catch(Exception e){System.out.println("failed to print to nexus socket. "+e.getMessage());}
	}
	
}
